home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
005
/
navplnr.arc
/
NAVPLNR.BAS
Wrap
BASIC Source File
|
1985-06-01
|
10KB
|
297 lines
1000 '** FP-04 7/2/84
1010 '
1020 ' FLIGHT PLANNING PROGRAM
1030 ' BY
1040 ' A. PILOT
1050 :CLS
1060 LOCATE 2,25:PRINT "Pilots Flight Planning program":LOCATE 4,1:
1070 PRINT "NOTE: Some airport and vor's have the same 3 letter ID's"
1080 PRINT "To avoid errors Airports are in the data base by NAME and VOR's"
1090 PRINT "are listed by 3 letter identifier. This is especially important"
1100 PRINT "as many VOR's are not located on the airport. Bakersfield Calif"
1110 PRINT "is a good example. This data base includes all California VOR's "
1120 PRINT "and Tower Controlled airports. You might want to add other"
1130 PRINT "navaids or airports you normally use. Also it would be very easy"
1140 PRINT "to enhance the program to add VARIATION to the data base for"
1150 PRINT "automatic input to the program. Suggest that the program be "
1160 PRINT "LISTED PRIOR TO USE to see airport/navaid id's in the data"
1170 PRINT "statements. [Program will ask for lat/long's if not in data base.]"
1180 PRINT:PRINT " SET KEYBOARD TO `CAPS 'BEFORE ENTERING DATA !!!"
1190 LOCATE 18,1:INPUT "Starting Airport[NAME] or VOR[IDENT]";P$
1200 RESTORE
1210 READ ID$,D1,M1,D2,M2
1220 IF ID$="END" THEN 1270
1230 IF ID$=P$ THEN 1250
1240 GOTO 1210
1250 PT=D1+(M1/60):PG=D2+(M2/60)
1260 GOTO 1320
1270 PRINT:PRINT P$;" Not in the Data Base..."
1280 INPUT "Gimme a (LAT)";D,M
1290 PT=D+(M/60)
1300 INPUT "Gimme a (LONG)";D,M
1310 PG=D+(M/60)
1320 INPUT "Next Airport[NAME]/VOR[IDENT]";D$
1330 RESTORE
1340 READ ID$,D1,M1,D2,M2
1350 IF ID$="END" THEN 1400
1360 IF ID$=D$ THEN 1380
1370 GOTO 1340
1380 DT=D1+(M1/60):DG=D2+(M2/60)
1390 GOTO 1450
1400 PRINT:PRINT D$;"Not in the data base..."
1410 INPUT "GIMME A (LAT): ";D,M
1420 DT=D+(M/60)
1430 INPUT "GIMME A (LONG): ";D,M
1440 DG=D+(M/60)
1450 INPUT "Wind Direction (DEG's)";WD
1460 INPUT "Wind Velocity (KTS's)";WV
1470 INPUT "True Airspeed (KTS's)";TA
1480 INPUT "Fuel Onboard (GAL's)";FU
1490 INPUT "Fuel burn rate (GPH )";FC
1500 PRINT "MAGNETIC VARIATION"
1510 INPUT " EXAMPLE (15,E)";MV,M$
1520 PRINT
1530 IF M$="E" THEN 1540 ELSE 1550
1540 MV=-MV
1550 AB=ABS((PT-DT)*60)
1560 BC=ABS((PG-DG)*60)*(COS((PT+DT)/114.59155#))
1570 DIS=SQR((AB^2)+(BC^2))
1580 ALPHA=ATN(BC/AB)*57.296
1590 IF PT<=DT THEN 1600 ELSE 1630
1600 IF PG<=DG THEN 1610 ELSE 1620
1610 TC=360-ALPHA:GOTO 1660
1620 TC=ALPHA:GOTO 1660
1630 IF PG<=DG THEN 1640 ELSE 1650
1640 TC=ALPHA+180:GOTO 1660
1650 TC=180-ALPHA
1660 ANG=ABS(TC-WD)
1670 IF ANF<360 THEN 1690
1680 ANG=ANG-360
1690 IF ANG=180 THEN 1720
1700 IF ANG=0 THEN 1730
1710 DF=180-ANG:GOTO 1760
1720 GS=TA+WV:GOTO 1740
1730 GS=TA-WV
1740 WCA=0
1750 DF=0:GOTO 1840
1760 X=(WV*SIN(DF/57.296))/TA
1770 WCA=ATN(X/(SQR(1-(X^2))))*57.296
1780 C=180-WCA-DF
1790 GS=(TA*SIN(C/57.296))/SIN(DF/57.296)
1800 IF TC>180 THEN 1880
1810 IF WD<TC THEN 1840
1820 IF <TC+180 THEN 1940
1830 IF WD>TC+180 THEN 1840
1840 IF WCA<0 THEN 1870
1850 TH=TC-WCA
1860 WCA=-WCA:GOTO 1960
1870 TH=TC+WCA:GOTO 1960
1880 IF WD<TC THEN 1900
1890 IF WD<TC+180 THEN 1920
1900 TH=TC-WCA
1910 WCA=-WCA:GOTO 1960
1920 TH=TC+WCA
1930 WCA=+WCA:GOTO 1960
1940 IF WCA>0 THEN 1950
1950 TH=TC+WCA
1960 MH=TH+MV
1970 EXT=(DIS/GS)+.3
1980 EF=FC*EXT
1990 FR=FU-EF
2000 CLS:PRINT " * * FROM ";P$;" TO ";D$;" * *"
2010 PRINT USING "True Course (DEG's ) ###";TC
2020 PRINT USING "Winds ### @ ## WCA = ##";WD,WV,WCA
2030 PRINT USING "True Heading (DEG's ) ###";TH
2040 PRINT USING "Magnetic Variation (Deg's) ###";MV
2050 PRINT USING "Magnetic Heading (DEG's) ###";MH
2060 PRINT " * * APPLY +/- COMP DEV CORR * *"
2070 PRINT USING "Ground Speed (KTS) = ###";GS
2080 PRINT USING "Distance Naut/Miles = ####";DIS
2090 HB=INT(EXT):MB=INT(60*(EXT-HB))
2100 HA=INT(HB/10):MA=INT(MB/10)
2110 HB=HB-10*HA:MB=MB-10*MA
2120 N$="0123456789":C$="+"
2130 Q=HA+1:GOSUB 2200
2140 H1$=F$:Q=HB+1:GOSUB 2200
2150 H2$=F$:Q=MA+1:GOSUB 2200
2160 H3$=F$:Q=MB+1:GOSUB 2200
2170 H4$=F$:T$=H1$+H2$+C$+H3$+H4$
2180 PRINT "EST FLT TIME (HH+MM) = ";T$
2190 GOTO 2210
2200 F$=MID$(N$,Q,1):RETURN
2210 PRINT USING "EST FUEL BURNED (GAL's) ###.#";EF
2220 PRINT USING "EST FUEL REMAIN (GAL's) ####.#";FR
2230 PRINT
2240 LOCATE 15,30:PRINT "HARD COPY <Y/N> ?";
2250 I$=INKEY$:IF I$="" THEN 2250
2260 IF I$="Y" THEN 2390
2270 LOCATE 16,30:PRINT "OTHER ALT./WINDS <Y/N> ?";
2280 I$=INKEY$:IF I$="" THEN 2280
2290 IF I$="Y" THEN PRINT:GOTO 1450
2300 LOCATE 17,30:PRINT "DIFFERENT START/STOP <Y/N> ?";
2310 I$=INKEY$:IF I$="" THEN 2310
2320 IF I$="Y" THEN PRINT :GOTO 1190
2330 LOCATE 18,30:PRINT "ANOTHER LEG <Y/N> ?";
2340 I$=INKEY$:IF I$="" THEN 2340
2350 IF I$="Y" THEN PRINT:GOTO 2380
2360 CLS:LOCATE 22,30:PRINT "HAVE A SAFE FLIGHT..."
2370 END
2380 P$=D$:PT=DT:PG=DG:GOTO 1320
2390 LPRINT " * * FROM ";P$;" TO ";D$;" * *"
2400 LPRINT USING "TRUE COURSE (DEG's) ###";TC
2410 LPRINT USING "WINDS ### @ ## WCA= ##";WD,WV,WCA
2420 LPRINT USING "TRUE HEADING (DEG's) ###";TH
2430 LPRINT USING "MAGNETIC VAR. (DEG's) ###";MV
2440 LPRINT USING "MAGNETIC HEADING (DEG's) ###";MH
2450 LPRINT "APPLY COMPASS +/- DEV. CORR: _ _" :LPRINT
2460 LPRINT USING "GROUND SPEED (KTS) ###";GS
2470 LPRINT USING "DISTANCE (N.MILES) ####";DIS
2480 LPRINT "EST. FLT TIME (HH+MM)=";T$
2490 LPRINT USING "EST. FUEL BURN (GAL's) ###.#";EF
2500 LPRINT USING "EST. FUEL REMAIN (GAL's) ####.#";FR
2510 LPRINT:LPRINT:LPRINT:LPRINT:LPRINT
2520 GOTO 2270
2530 DATA AHO,40,16,120,09
2540 DATA ACV,40,59,124,06
2550 DATA AVE,35,39,119,59
2560 DATA BLD,36,00,114,52
2570 DATA BSR,36,11,121,38
2580 DATA BIH,37,22,118,22
2590 DATA BLH,33,36,114,46
2600 DATA BFL,35,29,119,06
2610 DATA CMA,34,13,119,06
2620 DATA CIC,39,47,121,51
2630 DATA CCR,38,03,122,03
2640 DATA CEC,41,47,124,14
2650 DATA DAG,34,58,116,35
2660 DATA EDW,34,59,117,44
2670 DATA EED,34,46,114,28
2680 DATA FLW,35,06,119,52
2690 DATA FIM,34,21,118,53
2700 DATA FJS,41,27,122,48
2710 DATA FOT,40,40,124,14
2720 DATA FAT,36,53,119,48
2730 DATA FRA,37,06,119,36
2740 DATA GVO,34,32,120,05
2750 DATA GFS,35,08,115,10
2760 DATA GMN,34,48,118,52
2770 DATA HAF,37,31,122,30
2780 DATA HNW,38,43,120,45
2790 DATA HEC,34,48,116,28
2800 DATA IPL,32,45,115,30
2810 DATA JLI,33,08,116,35
2820 DATA LAS,36,05,115,09
2830 DATA LHS,34,41,118,35
2840 DATA LTA,39,11,120,16
2850 DATA LIN,38,04,121,00
2860 DATA LINDBERGH,32,44,117,11
2870 DATA LAX,33,56,118,26
2880 DATA HNL,21,19,157,55
2890 DATA MEADOWS,35,26,119,03
2900 DATA MONTGOMERY,32,47,117,13
2910 DATA MRX,33,47,117,11
2920 DATA MYV,39,06,121,34
2930 DATA MXW,39,19,122,13
2940 DATA MCC,38,40,121,24
2950 DATA MCE,37,13,120,24
2960 DATA MOD,37,38,120,57
2970 DATA MZB,32,47,117,13
2980 DATA NZJ,33,41,117,44
2990 DATA OAK,37,44,122,13
3000 DATA OCN,33,14,117,25
3010 DATA PMD,34,38,118,04
3020 DATA PSP,33,52,116,26
3030 DATA PXN,36,43,120,47
3040 DATA PDZ,33,55,117,32
3050 DATA PKE,34,06,114,41
3060 DATA PRB,35,40,120,38
3070 DATA POM,34,05,117,47
3080 DATA PGY,32,37,116,59
3090 DATA PYE,38,05,122,52
3100 DATA PTV,35,55,119,01
3110 DATA RNO,39,32,119,39
3120 DATA ROM,36,08,120,40
3130 DATA RBL,40,06,122,14
3140 DATA RDD,40,30,122,17
3150 DATA RAL,33,57,117,27
3160 DATA SAC,38,27,121,33
3170 DATA SNS,36,40,121,36
3180 DATA SJC,37,22,121,56
3190 DATA SBP,35,15,120,45
3200 DATA SNA,33,41,117,52
3210 DATA SXC,33,22,118,25
3220 DATA SMO,34,01,118,27
3230 DATA STS,38,30,122,49
3240 DATA SAU,37,51,122,31
3250 DATA SBA,34,26,119,50
3260 DATA SLI,33,47,118,03
3270 DATA SIY,41,47,122,28
3280 DATA SGD,38,11,122,22
3290 DATA SCK,37,50,121,10
3300 DATA TRM,33,38,116,10
3310 DATA SUU,38,21,121,49
3320 DATA TNP,34,07,115,46
3330 DATA UKI,39,03,123,16
3340 DATA VNY,34,13,118,29
3350 DATA SFO,37,37,122,22
3360 DATA VTU,34,07,119,03
3370 DATA VIS,36,22,119,29
3380 DATA ILA,39,04,122,02
3390 DATA OSI,37,24,122,17
3400 DATA SMX,34,53,120,27
3410 DATA VGT,36,12,115,11
3420 DATA WJF,34,44,118,13
3430 DATA BURBANK,34,12,118,21
3440 DATA PALOMAR,33,08,117,17
3450 DATA CHICO,39,48,121,51
3460 DATA CHINO,33,58,117,38
3470 DATA BUCHANAN,37,59,122,03
3480 DATA EL MONTE,34,05,118,02
3490 DATA FRESNO AT,36,46,119,43
3500 DATA CHANDLER,36,44,119,49
3510 DATA FULLERTON,33,52,117,59
3520 DATA HAWTHORNE,33,55,118,20
3530 DATA HAYWARD,37,40,122,07
3540 DATA IMPERIAL,32,50,115,34
3550 DATA FOX,34,44,118,13
3560 DATA MCCARRAN,36,05,115,09
3570 DATA NORTH TERMINAL,36,13,115,12
3580 DATA BRACKETT,34,05,117,47
3590 DATA LIVERMORE,37,42,121,49
3600 DATA LONG BEACH,33,49,118,09
3610 DATA LOS ANGELES,33,57,118,24
3620 DATA MARYSVILLE,39,06,121,34
3630 DATA MERCED,37,17,120,31
3640 DATA MODESTO,37,38,120,57
3650 DATA MONTEREY,36,35,121,51
3660 DATA NAPA,38,13,122,17
3670 DATA OAKLAND,37,43,122,13
3680 DATA ONTARIO,34,03,117,36
3690 DATA OXNARD,34,12,119,12
3700 DATA PALM SPRINGS,33,50,116,30
3710 DATA PALO ALTO,37,28,122,07
3720 DATA REDDING,40,31,122,18
3730 DATA RENO,39,30,119,46
3740 DATA RIVERSIDE,33,57,117,27
3750 DATA SAC EXECUTIVE,38,31,121,30
3760 DATA SAC METRO,38,42,121,36
3770 DATA SALINAS,36,40,121,36
3780 DATA SAN CARLOS,37,31,122,15
3790 DATA BROWN,32,34,116,59
3800 DATA GILLESPIE,32,50,116,58
3810 DATA SAN DIEGO,32,44,117,11
3820 DATA MONTGOMERY,32,49,117,08
3830 DATA SAN FRANCISCO,37,37,122,23
3840 DATA SAN JOSE,37,22,121,56
3850 DATA REID-HILLVIEW,37,20,121,49
3860 DATA ORANGE COUNTY,33,41,117,52
3870 DATA SANTA BARBARA,34,26,119,50
3880 DATA SANTA MARIA,34,54,120,27
3890 DATA SANTA MONICA,34,01,118,27
3900 DATA SANTA ROSA,38,31,122,49
3910 DATA SOUTH TAHOE,38,54,120,00
3920 DATA STOCKTON,37,54,121,14
3930 DATA TORRANCE,33,48,118,20
3940 DATA VAN NUYS,34,13,118,29
3950 DATA END,00,00,000,00